<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html">
<h:head>
	<h:outputStylesheet library="css" name="styles.css" />
</h:head>
<h:body>
	<h:form>
		<h:panelGrid class="header" columns="3" >
			
			<h:outputText value="#{msg['site.header']}" style=" font: 27px Georgia,Utopia,'Palatino Linotype',Palatino,serif;"/>
		
			<h:outputLink rendered="#{request.getUserPrincipal() == null}"
				value="#{request.contextPath}/login.xhtml">

				<h:outputText value="Login" />

			</h:outputLink>

			<h:panelGrid columns="1" width="150"
				rendered="#{request.getUserPrincipal() != null}">

				<h:outputText
					value="Welcome #{request.getUserPrincipal().getName()}" />
				<h:commandLink actionListener="#{userBean.logout}" value="Logout" />
			</h:panelGrid>
		</h:panelGrid>

	</h:form>
</h:body>
</html>